﻿using AsyncFlow.Interfaces;
using AsyncFlow.Responses;

namespace SwaggerDoc.Api.AsyncFlowJob
{
	public class DemoRequest
	{
		public string Name { get; set; }
	}

	public class DemoResponse
	{
		public string Message { get; set; }
	}

	public class DemoJob : IAsyncFlow<DemoRequest, DemoResponse>
	{
		public async Task<DemoResponse> ProcessAsync(DemoRequest request)
		{
			// 模拟耗时操作
			await Task.Delay(20000);
			return new DemoResponse { Message = $"Hello {request.Name}" };
		}
	}
}
